package com.me.template4j.exception;

import org.springframework.http.HttpStatus;

/**
 * @Authhor: qiu
 * @Date: 2022/12/13 1:31 下午
 */

public class CustomException extends Exception{

    private HttpStatus status;

    private String errMsg;

    public CustomException() {
        super();
        this.status = HttpStatus.BAD_REQUEST;
        this.errMsg = "未定义异常";
    }

    public CustomException(String errMsg) {
        super();
        this.status = HttpStatus.BAD_REQUEST;
        this.errMsg = errMsg;
    }

    public CustomException(HttpStatus status, String errMsg) {
        super();
        this.status = status;
        this.errMsg = errMsg;
    }

    public HttpStatus getStatus() {
        return status;
    }

    public void setStatus(HttpStatus status) {
        this.status = status;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }
}
